import { createI18n } from 'vue-i18n'
import cn from './cn'
import tw from './tw'
import ja from './ja'
import ko from './ko'
import en from './en'

const i18n = createI18n({
  locale: localStorage.getItem('lang') || 'en',
  messages: {
    cn,
    tw,
    ja,
    ko,
    en,
  },
  legacy: false,
  globalInjection: true,
})

export default i18n
